﻿using AnyLink.Domain.Enums;
using Newtonsoft.Json;
using SqlSugar;

namespace AnyLink.Domain.Entities.System
{
    /// <summary>
    /// 岗位信息表
    /// </summary>
    [SugarTable("sys_post", TableDescription = "岗位信息表", IsDisabledUpdateAll = true)]
    public class SysPost : BaseAuditedEntity<long>
    {
        /// <summary>
        /// 岗位ID
        /// </summary>
        [SugarColumn(ColumnName = "post_id", IsPrimaryKey = true, ColumnDescription = "岗位ID")]
        [JsonProperty(propertyName: "postId")]
        public override long Id { get; set; }

        /// <summary>
        /// 岗位编码
        /// </summary>
        [SugarColumn(ColumnName = "post_code", ColumnDataType = "VARCHAR(64)", ColumnDescription = "岗位编码", IsNullable = true)]
        public string PostCode { get; set; }

        /// <summary>
        /// 岗位名称
        /// </summary>
        [SugarColumn(ColumnName = "post_name", ColumnDataType = "VARCHAR(50)", ColumnDescription = "岗位名称", IsNullable = true)]
        public string PostName { get; set; }

        /// <summary>
        /// 显示顺序
        /// </summary>
        [SugarColumn(ColumnName = "post_sort", ColumnDescription = "显示顺序", IsNullable = true)]
        public int PostSort { get; set; }

        /// <summary>
        /// 状态（0正常 1停用）
        /// </summary>
        [SugarColumn(ColumnName = "status", ColumnDescription = "状态（0正常 1停用）", IsNullable = true)]
        public StatusEnum Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnName = "remark", ColumnDataType = "VARCHAR(500)", ColumnDescription = "备注", IsNullable = true)]
        public string Remark { get; set; }
    }
}